/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.agent.controller;

import cn.ac.iie.agent.tools.LoadMapData;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.LinkedBlockingQueue;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

/**
 *
 * @author zhangyun
 */
public class Controller {
    public static LinkedBlockingDeque<FTPClient> ftplists = new LinkedBlockingDeque<FTPClient>();
    public static BlockingQueue<String> subThreadList = new LinkedBlockingQueue<String>();//正在跑着的系统
    static Logger logger = null;
    
    static {
        PropertyConfigurator.configure(ClassLoader.getSystemClassLoader().getResource("log4j.properties"));
        logger = Logger.getLogger(Controller.class);
    }

    public static void main(String[] args) {
        //start.sh启动
//        Controller.confPath = args[0];
        //“运行”启动
//        Controller.confPath = "E:\\数据接入\\maven\\datadock-odata-exchange-server\\src\\main\\resources";

//        PropertyConfigurator.configure(Controller.confPath + "/log4j.properties");

        //初始化配置文件
        new LoadMapData().init();
        
        //启动http监听
        logger.info("#######begin");
        try {
            new AgentServer().run();
        } catch (Exception ex) {
            logger.error("jetty server start error!", ex);
        }
    }
}
